{
int rc = -ENODEV;
- rc = iommu_hardware_setup();
-
- iommu_enabled = (rc == 0);
+ if ( acpi_disabled )
+ iommu_enabled = 0;
+ else
+ {
+ rc = iommu_hardware_setup();
+ iommu_enabled = (rc == 0);
+ }
if ( force_iommu && !iommu_enabled )
panic("IOMMU setup failed, crash Xen for security purpose!\n");
struct iommu *iommu = NULL;
struct ir_ctrl *ir_ctrl;
- if ( (drhd = acpi_find_matched_drhd_unit(pdev)) == NULL )
- return;
+ drhd = acpi_find_matched_drhd_unit(pdev);
iommu = drhd->iommu;
ir_ctrl = iommu_ir_ctrl(iommu);
struct iommu *iommu = NULL;
struct ir_ctrl *ir_ctrl;
- if ( (drhd = acpi_find_matched_drhd_unit(pdev)) == NULL )
- return;
+ drhd = acpi_find_matched_drhd_unit(pdev);
iommu = drhd->iommu;
ir_ctrl = iommu_ir_ctrl(iommu);
if (!pdev)
return -ENODEV;
- if ( (drhd = acpi_find_matched_drhd_unit(pdev)) == NULL )
- return -ENODEV;
+ drhd = acpi_find_matched_drhd_unit(pdev);
pdev_iommu = drhd->iommu;
domain_context_unmap(source, bus, devfn);
for_each_pdev ( source, pdev )
{
drhd = acpi_find_matched_drhd_unit(pdev);
- if ( drhd && drhd->iommu == pdev_iommu )
+ if ( drhd->iommu == pdev_iommu )
{
found = 1;
break;